<!doctype html>
<html lang="zh-CN">

<head>
  <meta charset="UTF-8">
  <title>班级简历上传</title>
  <style>
    body {
      font-family: sans-serif;
      max-width: 600px;
      margin: 50px auto;
      padding: 20px;
      border: 1px solid #ccc;
      border-radius: 8px
    }

    input,
    button {
      width: 100%;
      padding: 10px;
      margin-top: 10px;
      box-sizing: border-box
    }

    button {
      background-color: #007bff;
      color: white;
      border: none;
      cursor: pointer
    }

    .error {
      color: red;
      font-weight: bold
    }
  </style>
</head>

<body>
  <h2>上传HTML简历</h2>
  <p>访问 <a href="/wall" target="_blank">作品展示墙</a> 查看所有作品。</p>{% with messages=get_flashed_messages() %}{% if messages %}
  <p class="error">{{ messages[0] }}</p>{% endif %}{% endwith %}
  <hr>
  <form method="post" action="/upload" enctype="multipart/form-data"><label for="student_name">姓名 (拼音, 如
      zhangsan):</label><input type="text" name="student_name" id="student_name" required><label
      for="secret_code">班级口令:</label><input type="password" name="secret_code" id="secret_code" required><label
      for="file">选择HTML文件 (最大2MB):</label><input type="file" name="file" id="file" accept=".html" required><button
      type="submit">上传</button></form>
</body>

</html>